#ifndef CompileConfig_h__
#define CompileConfig_h__

// platform defines
#define PLATFORM_WIN32	1
#define PLATFORM_LINUX	2
#define PLATFORM_WIN64  3
#define PLATFORM_IOS    4
#define PLATFORM_ANDROID 5

// compiler defines
#define COMPILER_MSVC	1
#define COMPILER_GCC	2

// select platform
#ifdef _WIN32
#define INF_PLATFORM PLATFORM_WIN32
#endif
#ifdef _M_X64
#undef INF_PLATFOR
#define INF_PLATFORM PLATFORM_WIN64
#endif

// select compiler type, version
#ifdef _MSC_VER
#define INF_COMPILER	COMPILER_MSVC
#define INF_COMP_VER	_MSC_VER
// _MSC_VER:
// 1300 as VC2003
// 1400 as VC2005
// 1500 as VC2008
#endif

#ifdef __APPLE__
#define INF_COMPILER   PLATFORM_IOS
#endif

#ifdef _DEBUG
#define INF_DEBUG
//#define INF_DEBUG_MEMORY          // be removed, when testing
//#define INF_REDIRECT_NEWDELETE    // be removed, when testing
#else
//#define INF_REDIRECT_NEWDELETE    // be removed, when testing
#endif


// instruction defines
#if (INF_PLATFORM==PLATFORM_WIN32)
#define INF_WIN_X86_ASM   1
#define INF_WIN_X86_MMX   1
#define INF_WIN_X86_SSE   1
#define INF_WIN_X86_SSE2  1
#elif (INF_PLATFORM==PLATFORM_WIN64)
#define INF_WIN_X64_ASM   1
#define INF_WIN_X64_MMX   1
#define INF_WIN_X64_SSE   1
#define INF_WIN_X64_SSE2  1
#elif (INF_PLATFORM==PLATFORM_IOS)
#define INF_WIN_X64_ASM   0
#define INF_WIN_X64_MMX   0
#define INF_WIN_X64_SSE   0
#define INF_WIN_X64_SSE2  0
#define INF_IOS_64_SSE   1
#endif


// stuff for function call
#if (INF_COMPILER == COMPILER_MSVC)
#	define INF_INLINE		__forceinline
#	define INF_FCALL		__fastcall
#else//if (INF_COMPILER == COMPILER_GCC)
//... for linuxs
#	define INF_INLINE		 
#	define INF_FCALL		
#endif

#undef C_W64
#if (INF_COMPILER == COMPILER_MSVC && INF_COMP_VER>=1300)
#	define C_W64 __w64
#else
#	define C_W64
#endif


// stuff for export & import spectfection
// ...

#if (INF_COMPILER==COMPILER_MSVC) && (INF_COMP_VER>=1300)
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif
#pragma warning( disable : 4244 )			// conversion to smaller type, possible loss of data
#pragma warning( disable : 4714 )			// function marked as __forceinline not inlined
#pragma warning( disable : 4127 )           // assert condiation as constants
#endif


// string stuff
#define	INF_MAX_STRING_CHARS		1024		// max length of a static string

#define INF_THREAD_SAFE_STR         1

#define INF_NEWLINE "\r\n"

#ifdef _UNICODE
#define INF_UNICODE
#endif

#endif // CompileConfig_h__
